<?php 
include('../common/common.php');
include('../common/checksession.php');
checksession("../index.php");
include('../../inc/conn.php');

$restore_id=$_GET["aid"];
$typeid	   =$_GET["type"];
$gurl=$_SERVER['HTTP_REFERER'];

isnum($restore_id,"文档错误","../moduls/arcback_list.php?pages=1");

$db=db_connect();//数据库连接


$sql=select_sql("`id`","`".PRETABLE."arctype`","`id`='".$typeid."'");
$rs=$db->query($sql) or die("datebase error!");
$is_type=$rs->num_rows;//文档个数
if($is_type==0){
	ShowMsg_h("栏目不存在，请直接删除该文档！",$gurl);
	exit;
}

$sql=update_sql("`".PRETABLE."arcmain`","`isdel`='0'","`id`='".$restore_id."'");
if(!$db->query($sql)){
	ShowMsg_h("操作失败!",$gurl);
	exit;
}
ShowMsg_h("操作成功!",$gurl);
$db->close();


?>